package com.qianli.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.qianli.dao.MessageDao;
import com.qianli.dao.NoteDao;
import com.qianli.pojo.Activity;
import com.qianli.pojo.Note;

@Transactional
public class MessageService {
	private MessageDao messageDao;
	private NoteDao noteDao;
	public List<Activity> findAllMes() {
		
		return messageDao.findAll();
	}
	public void saveMes(Activity activity,Note note){
	
		noteDao.save(note);
		Activity a=new Activity();
		a.setNote(note);
		messageDao.save(a);
	}
	public void setMessageDao(MessageDao messageDao) {
		this.messageDao = messageDao;
	}
	public void setNoteDao(NoteDao noteDao) {
		this.noteDao = noteDao;
	}
	
}
